
package net.swa.dewei.beans.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**车型城市关系表***/
@Entity
@Table(name = "t_Chexing_City")
public class ChenxingCityRelation
{
    //PK
    private Long id;

    /**车型id**/
    private Long chexingId;

    /**名称(不做数据库映射)**/
    private String name;

    /**车型图片（可以自定义图片覆盖原有的）**/
    private String imageUrl;

    private String minImageUrl;

    /**省**/
    private String province;

    /**市*/
    private String city;

    /**县**/
    private String town;

    /**创建时间**/
    private String crateDate;

    /**更新时间**/
    private String updateDate;

    /**排序（车型排序默认是和车型表一致，但是可以自定义以自定义为主）**/
    private Integer sort;

    @GenericGenerator(name = "generator", strategy = "native")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "id", unique = true, nullable = false)
    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getChexingId()
    {
        return chexingId;
    }

    public void setChexingId(Long chexingId)
    {
        this.chexingId = chexingId;
    }

    public String getProvince()
    {
        return province;
    }

    public void setProvince(String province)
    {
        this.province = province;
    }

    public String getCity()
    {
        return city;
    }

    public void setCity(String city)
    {
        this.city = city;
    }

    public String getTown()
    {
        return town;
    }

    public void setTown(String town)
    {
        this.town = town;
    }

    public Integer getSort()
    {
        return sort;
    }

    public void setSort(Integer sort)
    {
        this.sort = sort;
    }

    public String getCrateDate()
    {
        return crateDate;
    }

    public void setCrateDate(String crateDate)
    {
        this.crateDate = crateDate;
    }

    public String getUpdateDate()
    {
        return updateDate;
    }

    public void setUpdateDate(String updateDate)
    {
        this.updateDate = updateDate;
    }

    public String getImageUrl()
    {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl)
    {
        this.imageUrl = imageUrl;
    }

    @Transient
    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getMinImageUrl()
    {
        return minImageUrl;
    }

    public void setMinImageUrl(String minImageUrl)
    {
        this.minImageUrl = minImageUrl;
    }

    @Override
    public String toString()
    {
        return "ChenxingCityRelation [chexingId=" + chexingId + ", city=" + city + ", crateDate=" + crateDate + ", id="
                + id + ", imageUrl=" + imageUrl + ", name=" + name + ", province=" + province + ", sort=" + sort
                + ", town=" + town + ", updateDate=" + updateDate + "]";
    }

}